package sixkey.aop;

import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

/**
 * ClassName:PostAspect
 * Package:sixkey.aop
 * Description
 *
 * @Author:@wenxueshi
 * @Create:2023/6/22 - 13:44
 * @Version:v1.0
 */
@Component
@Aspect
public class PostAspect {

    @Pointcut("@annotation(org.springframework.web.bind.annotation.PostMapping)")
    public void pointcut(){};

    //前置通知，在目标方法被执行前执行
    @Before("pointcut()")
    public void postAdvice(){
        System.out.println("post请求的advice被触发...........");
    }
}
